package com.example.imgload_sdk.glide;

import android.app.Application;

import com.bumptech.glide.Glide;

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
//        Glide.with(this).load("").into(null);
        GlideApp.get(this).clearMemory();
    }

    //内存检测->低内存环境下->清理glide缓存

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
        if (level == TRIM_MEMORY_RUNNING_LOW){
            Glide.get(this).clearMemory();
        }
    }
}
